1  bulkTCRseq: Plot the frequency of all clones

1.1 Set up workspace

# Libraries
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.0.4     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(Seurat)
Loading required package: SeuratObject
Loading required package: sp

Attaching package: 'SeuratObject'

The following objects are masked from 'package:base':

    intersect, t
library(dplyr)
library(scRepertoire)

1.2 Objects for the LOD lines

indiv_lod_line <- geom_hline(yintercept = 0.0001, linetype = "dashed", color = "red")

1.3 Load PBMC data

p101_betas_typed <- read.csv("p101_betas_merged_typed_full_Part3.csv")
p103_betas_typed <- read.csv("p103_betas_merged_typed_full_Part3.csv")
p104_betas_typed <- read.csv("p104_betas_merged_typed_full_Part3.csv")
p105_betas_typed <- read.csv("p105_betas_merged_typed_full_Part3.csv")
p106_betas_typed <- read.csv("p106_betas_merged_typed_full_Part3.csv")
p108_betas_typed <- read.csv("p108_betas_merged_typed_full_Part3.csv")
p109_betas_typed <- read.csv("p109_betas_merged_typed_full_Part3.csv")
p110_betas_typed <- read.csv("p110_betas_merged_typed_full_Part3.csv")
p111_betas_typed <- read.csv("p111_betas_merged_typed_full_Part3.csv")

1.4 Massage data for frequency lineplot with 4 TCR types

p101_lineplot_data <- p101_betas_typed %>%
  select(c(Beta_clonotype, p101_pretreatment, p101_prevax, p101_postvax, Type)) %>%
  dplyr::rename("Pre-treatment" = "p101_pretreatment", "Pre-vaccine" = "p101_prevax", "Post-vaccine" = "p101_postvax") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p103_lineplot_data <- p103_betas_typed %>%
  select(c(Beta_clonotype, p103_pretreatment, p103_prevax, p103_postvax, p103_w48, p103_w72, Type)) %>%
  dplyr::rename("Pre-treatment" = "p103_pretreatment", "Pre-vaccine" = "p103_prevax", "Post-vaccine" = "p103_postvax", "W48" = "p103_w48", "W72" = "p103_w72") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W48", "W72")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p104_lineplot_data <- p104_betas_typed %>%
  select(c(Beta_clonotype, p104_pretreatment, p104_prevax, p104_postvax, p104_w48, Type)) %>%
  dplyr::rename("Pre-treatment" = "p104_pretreatment", "Pre-vaccine" = "p104_prevax", "Post-vaccine" = "p104_postvax", "W48" = "p104_w48") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W48")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p105_lineplot_data <- p105_betas_typed %>%
  select(c(Beta_clonotype, p105_pretreatment, p105_prevax, p105_postvax, p105_w48, Type)) %>%
  dplyr::rename("Pre-treatment" = "p105_pretreatment", "Pre-vaccine" = "p105_prevax", "Post-vaccine" = "p105_postvax", "W48" = "p105_w48") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W48")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p106_lineplot_data <- p106_betas_typed %>%
  select(c(Beta_clonotype, p106_pretreatment, p106_prevax, p106_postvax, p106_w48, Type)) %>%
  dplyr::rename("Pre-treatment" = "p106_pretreatment", "Pre-vaccine" = "p106_prevax", "Post-vaccine" = "p106_postvax", "W48" = "p106_w48") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W48")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p108_lineplot_data <- p108_betas_typed %>%
  select(c(Beta_clonotype, p108_pretreatment, p108_prevax, p108_postvax, p108_w32, Type)) %>%
  dplyr::rename("Pre-treatment" = "p108_pretreatment", "Pre-vaccine" = "p108_prevax", "Post-vaccine" = "p108_postvax", "W32" = "p108_w32") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W32")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p109_lineplot_data <- p109_betas_typed %>%
  select(c(Beta_clonotype, p109_pretreatment, p109_prevax, p109_postvax, p109_w48, Type)) %>%
  dplyr::rename("Pre-treatment" = "p109_pretreatment", "Pre-vaccine" = "p109_prevax", "Post-vaccine" = "p109_postvax", "W48" = "p109_w48") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W48")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p110_lineplot_data <- p110_betas_typed %>%
  select(c(Beta_clonotype, p110_pretreatment, p110_prevax, p110_postvax, p110_w38, Type)) %>%
  dplyr::rename("Pre-treatment" = "p110_pretreatment", "Pre-vaccine" = "p110_prevax", "Post-vaccine" = "p110_postvax", "W38" = "p110_w38") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W38")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

p111_lineplot_data <- p111_betas_typed %>%
  select(c(Beta_clonotype, p111_pretreatment, p111_prevax, p111_postvax, p111_w40,  Type)) %>%
  dplyr::rename("Pre-treatment" = "p111_pretreatment", "Pre-vaccine" = "p111_prevax", "Post-vaccine" = "p111_postvax", "W40" = "p111_w40") %>% 
  pivot_longer(!c(Beta_clonotype, Type), names_to = "Timepoint", values_to = "Frequency") %>%
  mutate(Frequency = replace_na(Frequency, 0),
         Timepoint = factor(Timepoint, levels = c("Pre-treatment", "Pre-vaccine", "Post-vaccine", "W40")),
         Type = factor(Type, levels = c("Other", "Existing", "Post-Nivolumab", "Post-Vaccine")),
         Beta_clonotype = forcats::fct_reorder(as.factor(Beta_clonotype), rank(Type)))

1.5 Plot frequency over time across 4 TCR types in P101 and P103

p101_lp <- p101_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P101") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p101_lineplot_data$Timepoint[[3]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p103_lp <- p103_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P103") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p103_lineplot_data$Timepoint[[5]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p104_lp <- p104_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P104") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p104_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p105_lp <- p105_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P105") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p105_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p106_lp <- p106_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P106") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p106_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p108_lp <- p108_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P108") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p108_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p109_lp <- p109_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P109") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p109_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p110_lp <- p110_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P110") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p110_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

p111_lp <- p111_lineplot_data %>%
  ggplot(aes(x = Timepoint, y = Frequency, color = Type, group = Beta_clonotype)) +
  geom_line() +
  scale_color_manual(values = c("grey90", "grey70", "darkgoldenrod3", "#0072B2")) +
  scale_y_log10() +
  annotation_logticks(sides = "l") +
  ggtitle("P111") +
  theme_classic() +
  theme(plot.title = element_text(hjust=0.5)) +
  indiv_lod_line +
  annotate("text", x = as.numeric(p111_lineplot_data$Timepoint[[4]]) + 0.25, y = 0.00013, label = "LOD", size = 4, color = "red")

1.6 Save P103’s lineplot as Fig 3B

p103_lp +
  annotate("segment", x = as.numeric(p103_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p103_lineplot_data$Timepoint[[5]]), y = 6, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.01, "npc"))) +
  annotate("text", x = as.numeric(p103_lineplot_data$Timepoint[[2]]) - 0.7, y = 6, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p103_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p103_lineplot_data$Timepoint[[3]]) + 0.4, y = 8, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p103_lineplot_data$Timepoint[[3]]) - 0.6, y = 8.5, label = "Vaccine", size = 3)
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
Warning in annotate("segment", x =
as.numeric(p103_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p103_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

1.7 Save the other patients’ lineplots as Fig S5A

p101_lp  +
  annotate("segment", x = as.numeric(p101_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p101_lineplot_data$Timepoint[[3]]), y = 6, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.01, "npc"))) +
  annotate("text", x = as.numeric(p101_lineplot_data$Timepoint[[2]]) - 0.6, y = 6, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p101_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p101_lineplot_data$Timepoint[[3]]), y = 8, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0.01, "npc"))) +
  annotate("text", x = as.numeric(p101_lineplot_data$Timepoint[[3]]) - 0.55, y = 8.5, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p101_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p101_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p104_lp  +
  annotate("segment", x = as.numeric(p104_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p104_lineplot_data$Timepoint[[3]]) + 0.84, y = 3, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p104_lineplot_data$Timepoint[[2]]) - 0.7, y = 3, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p104_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p104_lineplot_data$Timepoint[[3]]) + 0.46, y = 4, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p104_lineplot_data$Timepoint[[3]]) - 0.6, y = 4, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p104_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p104_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p105_lp +
  annotate("segment", x = as.numeric(p105_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p105_lineplot_data$Timepoint[[3]]) + 0.85, y = 3, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p105_lineplot_data$Timepoint[[2]]) - 0.7, y = 3, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p105_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p105_lineplot_data$Timepoint[[3]]) + 0.35, y = 4, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p105_lineplot_data$Timepoint[[3]]) - 0.6, y = 4, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p105_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p105_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p106_lp +
  annotate("segment", x = as.numeric(p106_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p106_lineplot_data$Timepoint[[3]]) + 0.87, y = 3, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p106_lineplot_data$Timepoint[[2]]) - 0.7, y = 3, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p106_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p106_lineplot_data$Timepoint[[3]]) + 0.32, y = 4, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p106_lineplot_data$Timepoint[[3]]) - 0.6, y = 4, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p106_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p106_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p108_lp +
  annotate("segment", x = as.numeric(p108_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p108_lineplot_data$Timepoint[[3]]) + 0.72, y = 3, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p108_lineplot_data$Timepoint[[2]]) - 0.7, y = 3, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p108_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p108_lineplot_data$Timepoint[[3]]) + 0.63, y = 4, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p108_lineplot_data$Timepoint[[3]]) - 0.6, y = 4, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p108_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p108_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p109_lp +
  annotate("segment", x = as.numeric(p109_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p109_lineplot_data$Timepoint[[3]]) + 0.86, y = 3, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.00, "npc"))) +
  annotate("text", x = as.numeric(p109_lineplot_data$Timepoint[[2]]) - 0.7, y = 3, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p109_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p109_lineplot_data$Timepoint[[3]]) + 0.57, y = 4, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p109_lineplot_data$Timepoint[[3]]) - 0.6, y = 4, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p109_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p109_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p110_lp +
  annotate("segment", x = as.numeric(p110_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p110_lineplot_data$Timepoint[[4]]), y = 6, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0.01, "npc"))) +
  annotate("text", x = as.numeric(p110_lineplot_data$Timepoint[[2]]) - 0.7, y = 6, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p110_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p110_lineplot_data$Timepoint[[3]]) + 0.55, y = 8, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p110_lineplot_data$Timepoint[[3]]) - 0.6, y = 8.5, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p110_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p110_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

p111_lp +
  annotate("segment", x = as.numeric(p111_lineplot_data$Timepoint[[2]]) - 0.3, xend = as.numeric(p111_lineplot_data$Timepoint[[3]]) + 0.68, y = 2, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "darkgoldenrod1", col = 'darkgoldenrod1',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p111_lineplot_data$Timepoint[[2]]) - 0.7, y = 2, label = "Nivolumab", size = 3) +
  annotate("segment", x = as.numeric(p111_lineplot_data$Timepoint[[3]]) - 0.3, xend = as.numeric(p111_lineplot_data$Timepoint[[3]]) + 0.5, y = 2.5, size = 3.5, linejoin = "mitre",
           alpha = 1,fill = "deepskyblue", col = 'deepskyblue',
            arrow = arrow(type = "closed", length = unit(0, "npc"))) +
  annotate("text", x = as.numeric(p111_lineplot_data$Timepoint[[3]]) - 0.6, y = 2.5, label = "Vaccine", size = 3)
Warning in annotate("segment", x =
as.numeric(p111_lineplot_data$Timepoint[[2]]) - : Ignoring unknown parameters:
`fill`
Warning in annotate("segment", x =
as.numeric(p111_lineplot_data$Timepoint[[3]]) - : Ignoring unknown parameters:
`fill`

1.8 Get session info

sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Rocky Linux 8.10 (Green Obsidian)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.15.so;  LAPACK version 3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/New_York
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] scRepertoire_2.0.0 Seurat_5.1.0       SeuratObject_5.0.2 sp_2.2-0          
 [5] lubridate_1.9.4    forcats_1.0.0      stringr_1.5.1      dplyr_1.1.4       
 [9] purrr_1.0.4        readr_2.1.5        tidyr_1.3.1        tibble_3.2.1      
[13] ggplot2_3.5.1      tidyverse_2.0.0   

loaded via a namespace (and not attached):
  [1] cubature_2.1.1              RcppAnnoy_0.0.22           
  [3] splines_4.3.2               later_1.4.1                
  [5] bitops_1.0-9                polyclip_1.10-7            
  [7] fastDummies_1.7.5           lifecycle_1.0.4            
  [9] globals_0.16.3              lattice_0.22-7             
 [11] MASS_7.3-60.0.1             magrittr_2.0.3             
 [13] plotly_4.10.4               rmarkdown_2.29             
 [15] httpuv_1.6.15               sctransform_0.4.1          
 [17] spam_2.11-1                 spatstat.sparse_3.1-0      
 [19] reticulate_1.42.0           cowplot_1.1.3              
 [21] pbapply_1.7-2               RColorBrewer_1.1-3         
 [23] abind_1.4-8                 zlibbioc_1.48.2            
 [25] Rtsne_0.17                  GenomicRanges_1.54.1       
 [27] ggraph_2.2.1                BiocGenerics_0.48.1        
 [29] RCurl_1.98-1.17             tweenr_2.0.3               
 [31] evmix_2.12                  GenomeInfoDbData_1.2.11    
 [33] IRanges_2.36.0              S4Vectors_0.40.2           
 [35] ggrepel_0.9.5               irlba_2.3.5.1              
 [37] listenv_0.9.1               spatstat.utils_3.1-0       
 [39] iNEXT_3.0.1                 MatrixModels_0.5-3         
 [41] goftest_1.2-3               RSpectra_0.16-2            
 [43] spatstat.random_3.3-1       fitdistrplus_1.2-2         
 [45] parallelly_1.41.0           leiden_0.4.3.1             
 [47] codetools_0.2-20            DelayedArray_0.28.0        
 [49] ggforce_0.4.2               tidyselect_1.2.1           
 [51] farver_2.1.2                viridis_0.6.5              
 [53] matrixStats_1.5.0           stats4_4.3.2               
 [55] spatstat.explore_3.3-2      jsonlite_1.8.9             
 [57] tidygraph_1.3.1             progressr_0.15.1           
 [59] ggridges_0.5.6              ggalluvial_0.12.5          
 [61] survival_3.8-3              tools_4.3.2                
 [63] stringdist_0.9.12           ica_1.0-3                  
 [65] Rcpp_1.0.14                 glue_1.8.0                 
 [67] gridExtra_2.3               SparseArray_1.2.4          
 [69] xfun_0.50                   MatrixGenerics_1.14.0      
 [71] GenomeInfoDb_1.38.8         withr_3.0.2                
 [73] fastmap_1.2.0               SparseM_1.84-2             
 [75] digest_0.6.37               timechange_0.3.0           
 [77] R6_2.6.1                    mime_0.13                  
 [79] colorspace_2.1-1            scattermore_1.2            
 [81] tensor_1.5                  spatstat.data_3.1-2        
 [83] generics_0.1.3              data.table_1.15.4          
 [85] graphlayouts_1.1.1          httr_1.4.7                 
 [87] htmlwidgets_1.6.4           S4Arrays_1.2.1             
 [89] uwot_0.2.3                  pkgconfig_2.0.3            
 [91] gtable_0.3.6                lmtest_0.9-40              
 [93] SingleCellExperiment_1.24.0 XVector_0.42.0             
 [95] htmltools_0.5.8.1           dotCall64_1.2              
 [97] scales_1.3.0                Biobase_2.62.0             
 [99] png_0.1-8                   spatstat.univar_3.0-0      
[101] ggdendro_0.2.0              knitr_1.49                 
[103] rstudioapi_0.17.1           rjson_0.2.23               
[105] tzdb_0.5.0                  reshape2_1.4.4             
[107] nlme_3.1-168                zoo_1.8-13                 
[109] cachem_1.1.0                KernSmooth_2.23-26         
[111] parallel_4.3.2              miniUI_0.1.1.1             
[113] pillar_1.10.1               grid_4.3.2                 
[115] vctrs_0.6.5                 RANN_2.6.2                 
[117] VGAM_1.1-13                 promises_1.3.2             
[119] xtable_1.8-4                cluster_2.1.8.1            
[121] evaluate_1.0.1              truncdist_1.0-2            
[123] cli_3.6.3                   compiler_4.3.2             
[125] rlang_1.1.5                 crayon_1.5.3               
[127] future.apply_1.11.3         plyr_1.8.9                 
[129] stringi_1.8.4               viridisLite_0.4.2          
[131] deldir_2.0-4                munsell_0.5.1              
[133] gsl_2.1-8                   lazyeval_0.2.2             
[135] spatstat.geom_3.3-2         quantreg_6.1               
[137] Matrix_1.6-5                RcppHNSW_0.6.0             
[139] hms_1.1.3                   patchwork_1.3.0            
[141] future_1.34.0               shiny_1.9.1                
[143] SummarizedExperiment_1.32.0 evd_2.3-7.1                
[145] ROCR_1.0-11                 igraph_2.0.3               
[147] memoise_2.0.1